# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=sniffles
pkgver=469.118e93f
pkgrel=10
arch=('x86_64' 'aarch64')
groups=('blackarch' 'blackarch-networking')
pkgdesc='A Packet Capture Generator for IDS and Regular Expression Evaluation.'
url='https://github.com/petabi/sniffles'
license=('GPL3')
depends=('python-sortedcontainers')
makedepends=('git' 'python-setuptools' 'python-pip' 'python-wheel')
source=("git+https://github.com/petabi/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/rulegen" "$pkgdir/usr/bin/$pkgname-rulegen"
}

